package com.e3.basdoc.tax.client;

import com.e3.basdoc.tax.model.TaxModel;
import com.e3.template.tgf.TGFEditorDialog;
import com.e3.template.tgf.TGFSimpleFormPanel;
import com.e3.web.core.client.GwtAsyncCallback;

public class TaxEditorDialog extends TGFEditorDialog<TaxModel> {
	
	private TaxRPCServiceAsync service = TaxRPCService.Util.getInstance();

	@Override
	public TGFSimpleFormPanel<TaxModel> createFormPanel() {
		return new TaxFormPanel();
	}

	@Override
	public void executeNewService(final TaxModel model, GwtAsyncCallback<TaxModel> callback) {
		service.newTax(model, callback);
	}

	@Override
	public void executeModifyService(final TaxModel model, GwtAsyncCallback<TaxModel> callback) {
		service.modifyTax(model, callback);
	}

	@Override
	public String[] getNotNullFieldNames() {
		return TaxHelper.INSTANCE.getNotNullFieldNames();
	}

}
